import java.rmi.*;
import java.rmi.registry.*;
import java.rmi.server.*;
import java.util.Random;

public class divide_number_provider extends UnicastRemoteObject implements divide_service {
	
	public divide_number_provider() throws RemoteException {
		super();
	}
	
	public String divide(String s1, String s2) {
		String result = "";
		try {
			int top = Integer.parseInt(s1);
			int bot = Integer.parseInt(s2);
			if(bot == 0) {
				System.err.println("ERROR: Division by zero");
				result = "FALSE";
			} else {
				result = Integer.toString(top/bot);	
			}
		} catch (NumberFormatException e) {
			System.err.printf("%s and %s must both be integers\n", s1, s2);
			result = "FALSE";
		}
		return result;
	}
}
